FROM ubuntu:23.10
FROM python:3.12.4-bookworm
RUN apt update -y && apt upgrade -y && apt install firefox-esr bash ffmpeg pipewire pipewire wireplumber alsa-utils -y && apt autoremove -y && apt autoclean -y 
RUN mkdir -p /home/aibot
RUN mkdir -p /home/aibot/pipe/runtime
RUN mkdir -p /home/aibot/pipe/pipi
RUN mkdir -p /tmp
RUN pip install --upgrade pip --break-system-packages
RUN pip install pyzam==0.10 --break-system-packages
WORKDIR /home/aibot/
COPY . .
ENV VIRTUAL_ENV "/venv"
RUN python -m venv ${VIRTUAL_ENV}
ENV PATH "VIRTUAL_ENV/bin:$PATH"
ENV XDG_RUNTIME_DIR "/home/aibot/pipe/runtime"
ENV PATH "XDG_RUNTIME_DIR:$PATH"
ENV PIPEWIRE_RUNTIME_DIR "/home/aibot/pipe/pipi"
ENV PATH "PIPEWIRE_RUNTIME_DIR:${PATH}"
RUN /venv/bin/python3 -m pip install -r requirements.txt
RUN chmod +x /home/aibot/dds
CMD [ "/venv/bin/python3", "run.py" ]
